Representation of Text, image and sound in computer
Objectives : Student should be able to -
Q1. Describe what is meant by File format.
Q2. How file format is often recognized?
| Example : | filename.txt | .txt | specifies that it is a Text file. |
| filename.pdf | specifies that it is a Portable Document File. | ||
| filename.bmp | .bmp | specifies that it is a Bitmap Image file. | |
| filename.mp3 | .mp3 | specifies that it is a Audio (sound/music) file. | |
| filename.mp4 | .mp4 | specifies that it is a Video file. |
Representation of Text in computer
Q3. Describ why we need to convert the data like text, image and sound into binary form for computers.
⇒ Computer is made up of silicon chips that contains millions of transistors or switch which could be in either 'ON' or 'OFF' state.
⇒ A switch in 'ON' state is represented by '1' and 'OFF' state is represented by '0'.
⇒ Computer can only understand these binary digits called Bits (1's and 0's).
⇒ Hence, everything that need to be processed by computer has to be converted into Binary format.
Q4. When converting text to binary a character set is used.
a) Describe what is meant by Character set.
⇒ A set of characters and symbols that can be represented by a computer system.
⇒ Each character and symbols is assigned a unique numerical value to represent it digitally in computers.
b) Why do computers need character set?
⇒ To store textual characters used by human in computers.
⇒ To communicate and exchange text between different computer system.
Q5. All data inside a computer is transmitted as a series of electrical signal that are either ON of OFF. Therefore, in order for a computer to be able to process any kind of data, including text, image and sound, they must be converted into binary form.
a) Describe how Text, Numbers and Symbols are stored in Computer.
⇒ Each character is assigned an internationally accepted numerical value called ASCII code or UNICODE.
⇒ These values are stored in binary format to represent each character in computer.
b) Describe ASCII code and its use.
⇒ ASCII stands for American Standard Code for Information Interchange.
⇒ It is internationally accepted 7-bit binary code (0 to 127 in denary or 00 to 7F in hexadecimal) to represent English alphabets, numbers and symbols found on a standard keyboard.
⇒ It could represent 128 possible characters including 32 control codes for control keys.
⇒ It provides the most common text file format like *.txt and *.html.
Note : Extended ASCII uses 8-bit code (0 to 255 in denary or 00 to FF in hexadecimal). It gives another 128 codes to allow for characters in non-English alphabets and for some graphical characters to be included.
c) Describe UNICODE and its use.
⇒ UNICODE is Universal Character encoding standard, designed to represent characters of all languages around the world.
⇒ It uses 16-bit or 32-bit binary code which could represent 216 or 232 possible characters.
⇒ It is more efficient character encoding system than ASCII, used to store text files, web-pages and other types of documents.
⇒ It contains reserved part of code for private use to enable a user to assign codes for their own characters and symbols.
d) Give difference between ASCII and UNICODE.
ASCII code UNICODEA character encoding standard for electronic communication, designed to represent english alphabets, numbers and symbols. A computing industry character encoding standard, designed to represent characters of all languages around the world. Stands for American Standard Code for Information Interchange Stands for Universal Character Encoding Supports 128 characters Supports a wide range of 216 to 232 possible characters Uses 7-bits to represent a character Uses 16-bit or 32-bit depending on the encoding type Requires less space Requires more space
Representation of Images in computer
Q6. Describe how Bitmap images are represented and stored in computer.
Q7. a) State what is meant by Pixel.
b) Describe pixel dimension of an image.
c) Describe resolution of an image.
d) Describe Colour Depth of an image.
e) How many bits per pixel would be required for an image with a palette of 256 possible colours?
Q8. The example below show two digital photographs captured by different cameras.
![]() |
|
| A | B |
a) Describe why image-A looks better than image-B.
b) Describe how does increasing the image resolution affect the file size.
⇒ Increase in resolution means increase in number of pixels or the density of pixel. As the number of pixels used to represent the image is increased, the size of the file will also increses.
c) Explain the relationship between image quality and file size.
d) State two factors that affects the file size of a bitmap image.
Q9. The example below show a small section of an image is zoomed in or enlarged.
![]() |
|
| A | B |
a) Describe why the enlarged image-B appears blurred.
b) The image-A uses 24-bit RGB colour to be displayed on screen at a resolution of 250 x 400 pixels.
Construct an expression and calculate the file size of the image-A in KB (Kilobytes).
⇒ To find the size of an image file, you multiply the resolution of the image by the colour depth :
Size of image file (in bits) = width (in pixels) x height (in pixels) x colour depth = 250 x 400 x 24 bits Size of image file (in bytes) = bytes since 1 byte = 8 bits 8 Size of image file (in KB) = (Or) approximately since 1 KB = 1024 bytes 8 x 1024 8 x 1000 (1000 bytes approximately) = 292.97 KB (Or) 300 KB approximately
Q10. a) Calculate the file size of 256 colour photo with dimension of 50x50 pixel.
256 Colour = 28 Colour
Hence, Colour depth = 8 bits. (i.e. number of bits needed to represent 256 colours)
| Size of image file (in bits) | = | Image resolution x colour depth | ||||
| = | 50 x 50 x 8 bits | |||||
| Size of image file (in bytes) | = | = 2500 bytes | ||||
| Divide by 8, since 1 byte = 8 bits | 8 | |||||
| Size of image file (in KB) | = | (Or) | approximately | |||
| since 1 KB = 1024 bytes | 8 x 1024 | 8 x 1000 | ||||
| (1000 bytes approximately) | ||||||
| = | 2.44 KB | (Or) | 2.5 KB | approximately | ||
b) What would be the file size if the photo is converted into Black and White.
Black and White means 2 colour = 21 Colour
Hence, Colour depth = 1 bits. (i.e. number of bits needed to represent 2 colours)
| Size of image file (in bits) | = | Image resolution x colour depth | ||||
| = | 50 x 50 x 1 bits | |||||
| Size of image file (in bytes) | = | = 312.5 bytes | ||||
| Divide by 8, since 1 byte = 8 bits | 8 | |||||
Q11. a) Describe what is meant by Metadata.
b) Give four examples of metadata.
Q12. Describe JPEG file format.
Q13. Digital Images are of two types Bitmap (Raster) image and Vector image.
Give difference between Bitmap and Vector Image .
⇒ Bitmap image is made up of tiny dots arranged in rows and columns called Pixel.
⇒ It stores the details of each pixel, like its location, colour depth, etc. Hence, its size is much larger than Vector image.
⇒ When enlarged, it loses its quality due to increase in distance between the pixel (i.e. reduced resolution).
⇒ Vector image uses geometrical formulas to represent shapes and images.
⇒ It stores the details of lines to be drawn from one node to another, hence its file size is much smaller than Bitmap image.
⇒ When enlarged, it does not loses its quality.
Bitmap Image Vector Image
Representation of Sounds in computer
Q14. Give difference between Analogue and Digital Signal with example.
⇒ Analogue signal is a continuous value that keeps on changing over a time period, like temperature, pressure, wall clock etc.
⇒ Analogue is a real value which cannot be read accurately.
⇒ It is represented by sine wave.
⇒ Digital signal is a discrete fixed set of values like 1, 2, 3, 4, ... etc.
⇒ Digital is a discrete in nature which can be read accurately, like digital clock, calculator etc.
⇒ It is represented by square wave.
![]() |
![]() |
![]() |
Red Colour wave : Analog Signal / Blue Colour wave : Digital Signal |
Sound is in Analog, which is converted to Digital using ADC (Analogue to Digital Converter) because Computer don't understand Analogue. |
|
Q15. Sound waves are converted into digital by sampling.
a) Describe what is meant by Sampling.
![]() |
A Sound Wave being Sampled. |
![]() |
b) Digital audio has a sample rate, sample resolution and bit rate.
Describe the following :
| Sample Rate | = |
Number of samples of sound that are recorded per second to represent an audio performance. It is measured in Hz or kHz. |
| Sample resolution | = |
Number of bits needed to store each sample of sound. The higher the sample resolution, the better the quality of sound recording, because more levels of signal or sound details can be captured. |
| Bit rate | = |
Number of bits that need to be processed every second. It is measured in kilobits per seconds. |
c) Explain how the quality of sound recording on a computer could be improved.
⇒ The increase in Sample rate increases the sound quality, because the sound samples will be closer together and will not miss the peaks and troughs of sound wave.
⇒ The higher the Sample resolution, the better the sound quality, because more levels of sound details can be captured.
Note : CDs have a 16-bit sampling resolution and a 44.1kHz sample rate - that is 44100 samples every second. This gives high-quality sound reproduction.
Q16. Give the benefits and drawbacks of using larger sampling resolution when recording sound.
Benefits |
Drawbacks |
| Provide more accurate mean values. | Produces larger file size. |
| Better sound quality. | Takes longer to transmit / download music files. |
| Less sound distortion (imperfect sound). | Requires greater processing power. |
Q17. A 32-second sound clip is be recorded, sampled 1600 times a second. Each sample is be stored using 8 bits.
Calculate the file size in kilobytes. You must show all of your working.
| Size of sound file (in bits) | = | Sample rate x Sound resolution x Time in seconds | ||||
| = | 1600 x 8 x 32 bits | |||||
| Size of sound file (in bytes) | = | = 512000 bytes | ||||
| Divide by 8, since 1 byte = 8 bits | 8 | |||||
| Size of sound file (in KB) | = | = 500 KB | ||||
| Since 1 KB = 1024 bytes | 8 x 1024 | |||||
Q18. A typical, uncompressed high-quality audio file has a sample rate of 44,100 samples per second, a bit depth of 16 bits per sample and 2 channels of stereo audio.
a) Calculate the bit rate of the audio file.
| Bit rate (in bps) | = | Sample rate x Sound resolution x Channels | ||||
| = | 44100 x 16 x 2 = 1411200 bps | |||||
| Bit rate (in kbps) | = | = 1411.2 kbps | ||||
| Since 1 kbps = 1000 bits/sec | 1000 | |||||
b) Calculate the file size of 4 minute song with the above bit range in megabytes.
| Size of sound file (in bits) | = | Bit rate (bps) x Length of sound in seconds | ||||
| = | 1411200 x 4 x 60 | |||||
| Size of sound file (in bytes) | = | = 42336000 bytes | ||||
| Since 1 Byte = 8 bits | 8 | |||||
| Size of sound file (in MB) | = | = 40.37 MB | ||||
| Since 1 MB = 1024 x 1024 bytes | 8 x 1024 x 1024 | |||||
Q19. Describe MP3 file format.
REVISION : Statements and its key computing terms.
| A list of characters that have been defined by computer hardware and software. The character set is necessary so that the computer can understand human characters. | Character set |
| A character set for all the characters on a standard keyboard and control codes. | ASCII code |
| A character set which represents all the languages of the world (the first 128 characters are the same as ASCII code). | Unicode |
The term drived from 'picture element'; the smallest addressable area of an image; arranged in matrix of rows and column to make up an image. |
Pixel |
| An image made up of pixels. | Bigmap (or Raster) Image |
| The number of pixels in the X-Y direction of an image, for example, 4096 x 3192 pixels. |
Image resolution |
| The number of bits used to represent the colours of a pixel. | Colour depth |
| The number of pixels per square inch. | Pixel density |
| The number of bits used to represent sound amplitude in digital sound recording (also known as Bit depth). | Sample resolution |
| The number of bits used to represent the smallest unit in a sound file. | Bit depth |
| The number of sound samples taken per second in digital sound recording. | Sampling rate |
| Number of bits that need to be processed every second. It is measured in kilobits per seconds. | Bit Rate |